<%--
  Created by IntelliJ IDEA.
  Role: admin
  Date: 2021/12/31
  Time: 10:44
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>分配权限</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/pintuer.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/admin.css">
    <script src="${pageContext.request.contextPath}/static/js/jquery.js"></script>
    <script src="${pageContext.request.contextPath}/static/js/pintuer.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.js"></script>
    <script>
        $(function(){
            var array=new Array();
            <c:forEach items="${permissionIds}" var="item">
            array.push("${item}");
            </c:forEach>
            for (var i=0;i<array.length;i++){
                $("#" + array[i]).attr("checked","checked");
            }
        })
    </script>
</head>
<body>
<center><h1>分配权限页面</h1>
    <font color="red">${sysRole_db.roleName}</font> --分配权限:
    <hr>
</center>
<form action="${pageContext.request.contextPath}/sysPermissionController/FPPermission" method="post">
    <input type="hidden" name="sysRoleIdStr" value="${sysRole_db.roleId}">
    <table class="table table-hover text-center">
        <tr >
            <td colspan="36">权限列表：</td>
        </tr>
        <tr>
            <c:forEach items="${sysPermissionList_db}" var="sysPermission_db">
                <td><input type="checkbox" name="sysPermissionIdStrs" id="${sysPermission_db.permissionId}"
                           value="${sysPermission_db.permissionId}">${sysPermission_db.permissionName}</td>
            </c:forEach>
        </tr>
        <tr >
            <td colspan="36"><input class="button border-green" type="submit" value="分配权限"></td>
        </tr>
    </table>
</form>

</body>
</html>
